class CreateTrackers < ActiveRecord::Migration
  def self.up
    create_table :trackers do |t|
      t.column :name, :string, :null => false
      t.column :url, :string, :null => false
      t.column :id_matcher, :string
    end

    add_column "clients", "tracker_id", :integer

    add_index "clients", ["tracker_id"], :name => "fk_client_tracker"
  end

  def self.down
    remove_index "clients", :name => "fk_client_tracker"
    remove_column "clients", "tracker_id"
    drop_table :trackers
  end
end
